package com.bjgzy.rating.di.module;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.bjgzy.rating.mvp.adapter.ExpandableItemAdapter;
import com.bjgzy.rating.mvp.contract.SignUpContract;
import com.bjgzy.rating.mvp.model.SignUp1Model;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.jess.arms.di.scope.ActivityScope;

import java.util.ArrayList;
import java.util.List;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;

/**
 * @author xubo
 * @date 2018-8-9 11:43:59
 */
@Module
public abstract class SignUpModule {

    @Binds
    abstract SignUpContract.Model bindSignUp1Model(SignUp1Model model);

    @ActivityScope
    @Provides
    static List<MultiItemEntity> provideList() {
        return new ArrayList<>();
    }

    @ActivityScope
    @Provides
    static ExpandableItemAdapter provideAdapter(List<MultiItemEntity> list) {
        return new ExpandableItemAdapter(list);
    }

    @ActivityScope
    @Provides
    static RecyclerView.LayoutManager provideLayoutManger(SignUpContract.View view) {
        return new LinearLayoutManager(view.getActivity());
    }

}